ProgressBar要设成手动模式才能 用自己的代码控制其进度值。
http://help.adobe.com/zh_CN/as3/components/WS5b3ccc516d4fbf351e63e3d118a9c65b32-7fa4.html
亮点:
aPb.mode = ProgressBarMode.MANUAL;
progLabel.setSize(150, 22);
progLabel.move(180, 150);
progLabel.text = "";
aNs.move(220, 215);
aNs.maximum = 250;
aNs.minimum = 0;
aNs.stepSize = 1;
aNs.value = 0;
aNs.addEventListener(Event.CHANGE, nsChangeHandler);
function nsChangeHandler(event:Event):void {
aPb.setProgress(aNs.value, aNs.maximum);
progLabel.text = "Percent of progress = " + int(aPb.percentComplete) + "%";
}
HxLauncher: Launch Android applications by voice commands